﻿/******************************************************   
创建者: ljj
创建时间: 2017-07-31
修改:
修改时间: 
功能: 调拨方案实体
 ******************************************************/

using com.nm.Attributes;
using Newtonsoft.Json;
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;

namespace CommodityTransferAPI.Model
{
    public class MvAllotProjectMasterModel
    {
        /// <summary>
        /// 调拨方案实体
        /// </summary>
        /// Writer：ljj
        /// Create Date：2017-07-31
        public class CreatModel : NeceModel
        {
            [ParamDescription("读取时间")]
            public DateTime? LoadTime { get; set; }
            [ParamDescription("修改时间")]
            public DateTime? EtlDate { get; set; }
        }

        /// <summary>
        /// 调拨方案主要实体
        /// </summary>
        /// Writer：ljj
        /// Create Date：2017-07-31
        public class CoreModel
        {
            [JsonProperty(NullValueHandling = NullValueHandling.Ignore)]
            [ParamDescription("公司代码")]
            public string CompanyID { get; set; }

            [JsonProperty(NullValueHandling = NullValueHandling.Ignore)]
            [ParamDescription("数据源")]
            public string ExtrSource { get; set; }

            [JsonProperty(NullValueHandling = NullValueHandling.Ignore)]
            [ParamDescription("方案编码")]
            public string ProjectCode { get; set; }
            
            [ParamDescription("方案名称")]
            public string ProjectName { get; set; }

            [ParamDescription("零售分部")]
            public string OperationAreaID { get; set; }

            [ParamDescription("方案状态")]
            public bool ProjectState { get; set; }
        }

        /// <summary>
        /// 调拨方案主要实体
        /// </summary>
        /// Writer：ljj
        /// Create Date：2017-07-31
        public class NeceModel : CoreModel
        {
            [ParamDescription("调拨区域1-单分部、2-多分部、3-组合")]
            public long? AllotArea { get; set; }

            [ParamDescription("方案状态默认true－启用,false-不启用")]
            public bool? ProjectState { get; set; }

            [ParamDescription("执行周期1-每周;2-单周;3-双周")]
            public long? ExecCycle { get; set; }
            
            [ParamDescription("执行时间，星期1-7")]
            public long? ExecWeek { get; set; }

            [JsonProperty(NullValueHandling = NullValueHandling.Ignore)]
            [ParamDescription("创建时间")]
            public DateTime? CreateDate { get; set; }

            [JsonProperty(NullValueHandling = NullValueHandling.Ignore)]
            [ParamDescription("创建人")]
            public long? Creator { get; set; }
            
            [ParamDescription("分部优先-1")]
            public string PriorityOperationArea { get; set; }
        }

        /// <summary>
        /// 调拨方案显示实体
        /// </summary>
        /// Writer：ljj
        /// Create Date：2017-07-31
        public class ListModel : NeceModel
        {
            [ParamDescription("零售区域")]
            public string OperationAreaID { get; set; }
            
            [ParamDescription("货号")]
            public string MaterialID { get; set; }

            [ParamDescription("货品简称")]
            public string MaterialShortName { get; set; }
        }

        /// <summary>
        /// 调拨方案显示实体
        /// </summary>
        /// Writer：ljj
        /// Create Date：2017-07-31
        public class ShowModel:NeceModel
        {
            public IList<MvAllotProjectDetailModel.MaterialModel> MaterialList { get; set; }
            public IList<string> OperationAreaList { get; set; }
        }
    }

    public class MvAllotProjectDetailModel
    {
        /// <summary>
        /// 调拨方案零售区域实体
        /// </summary>
        /// Writer：ljj
        /// Create Date：2017-07-31
        public class CoreModel
        {
            [ParamDescription("零售区域")]
            public string OperationAreaID { get; set; }
        }
        /// <summary>
        /// 调拨方案明细实体
        /// </summary>
        /// Writer：ljj
        /// Create Date：2017-07-31
        public class NeceModel : CoreModel
        {
            [ParamDescription("货号")]
            public string MaterialID { get; set; }
        }

        public class MaterialModel: NeceModel
        {
            [ParamDescription("货品简称")]
            public string MaterialShortName { get; set; }
        }

        /// <summary>
        /// 调拨方案明细创建实体
        /// </summary>
        /// Writer：ljj
        /// Create Date：2017-07-31
        public class CreateModel: NeceModel
        {
            [JsonProperty(NullValueHandling = NullValueHandling.Ignore)]
            [ParamDescription("公司代码")]
            public string CompanyID { get; set; }

            [JsonProperty(NullValueHandling = NullValueHandling.Ignore)]
            [ParamDescription("数据源")]
            public string ExtrSource { get; set; }

            [JsonProperty(NullValueHandling = NullValueHandling.Ignore)]
            [ParamDescription("方案编码")]
            public string ProjectCode { get; set; }
        }
    }
}
